<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>登录页面</title>
    <script type="text/javascript" src="../script/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="../script/login.js"></script>
    <script type="text/javascript" src="../script/commonFunction.js"></script>
    <link type="text/css" href="../css/registerLogin.css" rel="stylesheet"/>
    <style type="text/css">
        #ld{
            color: rgba(0,0,0,0.7);
            position: relative;
            top: 43px;
            left: -139px;
        }
        #ld a{
            text-decoration: none;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $("input").focus(function () {
                $("#error1").html("");
            })
        })
    </script>

</head>

<body id="loginBody">

<fieldset>

    <div id="error1">
        <c:if test="${error != null}">
            ${error}
        </c:if>
    </div>

    <legend align="center">用户登录</legend>
    <form action="../user/login" method="post" onsubmit="return checkForm()">
        <div>
            用户名：<input type="text" name="phone" id="name" placeholder="请输入11位数字手机号码" />
        </div>
        <div class="error" id="name_error"></div>

        <div>
            密　码：<input type="password" name="password" id="psw" placeholder="请输入密码" />
        </div>
        <div class="error" id="psw_error"></div>

        <div style="margin-top: 20px">
            <input type="submit" value="登录" id="submit1" class="sub" />
            <a href="register.jsp"><input type="button" value="注册" class="sub" /></a>
        </div>
    </form>

    <div id="ld"> <a href="../index.jsp">去首页</a> </div>
</fieldset>

</body>

</html>